package main

import (
	"log"
	"net/http"
)

func main() {
	//-->静态文件加载
	http.Handle("/images/", http.FileServer(http.Dir("static")))
	http.Handle("/js/", http.FileServer(http.Dir("static")))
	http.Handle("/css/", http.FileServer(http.Dir("static")))
	http.Handle("/bootstrap/", http.FileServer(http.Dir("static")))

	http.HandleFunc("/", index)
	http.HandleFunc("/login", login)
	http.HandleFunc("/regis", regis)
	err := http.ListenAndServe(":9001", nil)
	if err != nil {
		log.Fatal("ListenAndServer:", err)
	}
}
